<html>
    <head>
        <script type="text/javascript">
            
            function setCookie(c_name,value,exdays)
            {
                var exdate=new Date();
                exdate.setDate(exdate.getDate() + exdays);
                var c_value=escape(value) + ((exdays==null) ? "" : "; expires="+exdate.toUTCString());
                document.cookie=c_name + "=" + c_value;
            }

            function addCookie()
            {
                setCookie("name1", "this is a value1" ,365);
                setCookie("name2", "this is a value2" ,365);
            }
        </script>
    </head>
    <body onload="addCookie()">
        <a href="image_jpg.jpg">image_jpg.jpg</a><br/>
        <a href="image_gif.gif">image_gif.gif</a><br/>
        <a href="text.txt">text.txt</a><br/>
        <br/>
        <h3>Login</h3>
        <form action="" method="POST">
            Username: <input type="text" name="user"/><br/>
            Password: <input type="password" name="pass"/><br/>
            <input type="submit" value="Login"/>              
    </body>
</html>
